import Vue from "vue";
import Router from "vue-router";
import Home from "./views";
import { NODE_ENV } from "@assets/config/config";
Vue.use(Router);

const router = new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/",
      name: "home",
      component: Home,
      redirect: "/page1"
    },
    {
      path: "/page1",
      name: "page1",
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ "./views/page1"),
      children: []
    }
  ]
});
router.beforeEach();
export default router;
